home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
examples
/
exam32
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-27
|
1KB
|
83 lines
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/
#include "generics.h"
main(int argc, char *argv[])
{
object myObj;
gPrint_t print_method;
int i;
InitDynace(&argc);
/* Create an instance of the ShortInteger class */
myObj = gNewWithInt(ShortInteger, 6);
/* perform the runtime overhead of finding the method once */
print_method = imiPointer(myObj, gPrint);
for (i=0 ; i++ != 10 ; )
/* use it over and over without any lookup overhead */
/* Note that it's the same as: gPrint(myObj, stdoutStream);*/
print_method(myObj, stdoutStream);
gDispose(myObj);
return 0;
}
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/